package com.alcatel.axs.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


@Entity 
@Table(name="SERVER")
public class Server implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    private int id=0;

    private String ip;
    
    private String status;
  
    @Column(name = "id")
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "ip", unique = true, nullable = false, length = 45)
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String m_status) {
        this.status = m_status;
    }

    @Override
    public String toString() {
        String temp="Server id: " + id + " ip: " + ip + ". Status : " + status + " .";
        return temp;
    }
}
